[ToC] [Up] [Back] [Next] ... [Book Plug] |
The Information Commons .................... Introduction to HTML |
In particular, as HTML 2.0 does not contain a TABLE element the PRE element is the only way in which structured tables can be properly displayed on most current browsers.
HTML 3 does support tables, and an implementation of the TABLE element is supported by a number of browsers. This is discussed in the TABLES documentation.
PRE takes one optional attribute: WIDTH. This specifies the maximum number of characters that can be displayed on a single line. A default value of 80 is often assumed, but this depends on the browser. Mosaic, for example, ignores the WIDTH attribute completely. It is likely that the width attribute will be dropped in subsequent versions of HTML.
You can include character emphasis elements (EM, STRONG, B, I, etc.) as well as hypertext anchors within a PRE.
<P>, <ADDRESS>, <Hn>
and so on. You
should avoid the use of tab characters -- use single blank
characters to space text apart.
<PRE WIDTH=30> Hi there. This is a rather <EM>stupid</EM> example. Lord only knows what I was thinking at the time. I suppose I should get more sleep when I do this stuff. But why should I try and write Shakespearean sonnets when it is just a stupid example of the <A HREF="pre.html">PRE</A> element! </PRE>
Hi there. This is a rather stupid example. Lord only knows what I was thinking at the time. I suppose I should get more sleep when I do this stuff. But why should I try and write Shakespearean sonnets when it is just a stupid example of the PRE element!
[ToC] [Up] [Back] [Next] ... [Book Plug] | .................... Introduction to HTML |
© Ian Graham 1994-1995 | Page Last Updated: 4 December 1995 |